import requests


class LoginAPI(object):

    def __init__(self):
        self.url = 'http://ihrm-test.itheima.net/api/sys/login'
        self.headers = {"Content-Type": "application/json"}

    def login(self, login_data):
        response = requests.post(url=self.url, headers=self.headers, json=login_data)
        return response


if __name__ == '__main__':
    login = LoginAPI()
    l_data = {
        "mobile": "13800000002",
        "password": "123456"
    }
    print(login.login(l_data).json())

